Skip to content

test: use vector tolerance instead of abs value and fix symbol export checks failed in macos and windows - #77

Merged
sbillinge merged 3 commits into
diffpy:mainfrom
SYMSCAE:kernel
Nov 14, 2026
Merged

sbillinge merged 3 commits into
diffpy:mainfrom
SYMSCAE:kernel

Conversation

@SYMSCAE

@SYMSCAE SYMSCAE commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Follow up on #76's matrix failure, this PR:

  • replace nm symbol checks with the more universal llvm-nm ones so that calling conventions work on all platforms.
  • replace the exact magnitude check for bond vectors with tolerance

Matrix results https://github.com/SYMSCAE/libdiffpy/actions/runs/43551510428/job/132314796109

SYMSCAE and others added 3 commits November 13, 2026 19:18
Release builds use -ffast-math, with LTO and FMA the inlined
Lattice::cartesian in the bond generator can round differently from the
out-of-line one the reference calls.  This failed the exact comparison on
macOS arm64.  Use EpsilonEqual like the other tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dumpbin /disasm prints no function labels for objects and the cctools nm
of the conda macOS compilers rejects the GNU options.  llvm-nm and
llvm-objdump read ELF, Mach-O and COFF alike, install them in the CI
environment and use them on all platforms.  Save the kernel objects when
the check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SYMSCAE

SYMSCAE commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

@sbillinge PR ready for review.

@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.04%. Comparing base (472e00a) to head (4bbcc80).

Files with missing lines Patch % Lines
src/tests/TestBondGeneratorBatching.cpp 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
+ Coverage   87.03%   87.04%   +0.01%     
==========================================
  Files         147      147              
  Lines        8377     8376       -1     
  Branches     2060     2059       -1     
==========================================
  Hits         7291     7291              
+ Misses        629      628       -1     
  Partials      457      457              
Files with missing lines Coverage Δ
src/tests/TestBondGeneratorBatching.cpp 92.28% <33.33%> (+0.25%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge
sbillinge merged commit 17f7c56 into diffpy:main Nov 14, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants